<include file="__THEME__/admin_header" />
<div id="container" class="so_main">
    <div class="page_tit">用户数据分析</div>
	<div class="tit_tab">
		<ul>
			<!-- <li><a href="{:U('admin/Home/visitorCount',array('type'=>'today'))}" <eq name='type' value='today'> class = "on"</eq>>{:L('PUBLIC_TODAY')}</a></li>
            <li><a href="{:U('admin/Home/visitorCount',array('type'=>'yesterday'))}" <eq name='type' value='yesterday'> class = "on"</eq>>{:L('PUBLIC_YESTERDAY')}</a></li> -->
			<li><a href="{:U('admin/Home/statistics',array('type'=>'week'))}" <eq name='type' value='week'> class = "on"</eq>>{:L('PUBLIC_LAST_SEVEN_DAYS')}</a></li>
			<li><a href="{:U('admin/Home/statistics',array('type'=>'30d'))}" <eq name='type' value='30d'> class = "on"</eq>>{:L('PUBLIC_LAST_THIRTY_DAYS')}</a></li>
			<li><a href="{:U('admin/Home/statistics',array('type'=>'month'))}" <eq name='type' value='month'> class = "on"</eq>>{:L('PUBLIC_THIS_MONTH')}</a></li>
			<li>
				<form method ='GET' action="{:U('admin/Home/visitorCount')}">
					<input type="hidden" name='app' value='admin'>
					<input type="hidden" name='mod' value='Home'>
					<input type="hidden" name='act' value='visitorCount'>
					<input style="margin-top:4px" type="text" readonly="readonly" onfocus="core.rcalendar(this,'Y-m-d');" value="{$_GET.start_day}" id="start_day" class="s-txt" name="start_day">
					-
					<input style="margin-top:4px" type="text" readonly="readonly" onfocus="core.rcalendar(this,'Y-m-d');" value="{$_GET.end_day}" id="end_day" class="s-txt" name="end_day">
					<input style="margin-top:4px" type="submit" value="{:L('PUBLIC_SYSTEM_FIND')}" class="btn_b">
				</form>
			</li>
		</ul>
	</div>
    <div class="form2">
         <h3 onclick="admin.fold('app_1');">{:L('PUBLIC_USER＿INFORMATION')}</h3>
         <div id='app_1' class="list">
         	<table width="100%" cellspacing="0" cellpadding="0" border="0">
         		<tr >
         			<th>{:L('PUBLIC_TOTAL_REGISTERED_USERS')}</th><th class="line_l">{:L('PUBLIC_TOTAL_ACTIVE_USERS')}</th><th class="line_l">{:L('PUBLIC_LARGEST_ONLINE_YESTERDAY')}</th><th class="line_l">{:L('PUBLIC_ONLINE_CURRENT')}</th><th class="line_l">{:L('PUBLIC_LARGEST_ONLINE_WEEK')}</th>
         		</tr>
         		<tr>
         			<td>{$userInfo.totalUser|default=0}</td>
         			<td>{$userInfo.activeUser|default=0}</td>
         			<td>{$userInfo.yesterdayUser|default=0}</td>
         			<td>{$userInfo.onlineUser|default=0}</td>
         			<td>{$userInfo.weekAvg|default=0}</td>
         		</tr>
         	</table>
         </div>
         <h3 onclick="admin.fold('app_2');">{:L('PUBLIC_ACCESS_INFORMATION')}</h3>
         <div id='app_2' class="list">
         	<table width="100%" cellspacing="0" cellpadding="0" border="0">
         		<tr>
         			<th>{:L('PUBLIC_TIME')}</th><th class="line_l">{:L('PUBLIC_PAGE_VIEWS')}</th><th class="line_l">{:L('PUBLIC_INDEPENDENT_VISITORS')}</th><th class="line_l">{:L('PUBLIC_PER_CAPITA_VIEWS')}</th>
         		</tr>
         		<tr>
         			<td>{:L('PUBLIC_TODAY')}</td>
         			<td>{$visitCount.today.pv|default=0}</td>
         			<td>{$visitCount.today.pu|default=0}</td>
         			<td>{:round($visitCount['today']['pv']/$visitCount['today']['pu'],2)}</td>
         		</tr>
         		<tr>
         			<td>{:L('PUBLIC_YESTERDAY')}</td>
         			<td>{$visitCount.yesterday.pv|default=0}</td>
         			<td>{$visitCount.yesterday.pu|default=0}</td>
         			<td>{:round($visitCount['yesterday']['pv']/$visitCount['yesterday']['pu'],2)}</td>
         		</tr>
         		<tr>
         			<td>{:L('PUBLIC_ONE_WEEK_AVERAGE')}</td>
         			<td>{$visitCount.weekAvg.pv|default=0}</td>
         			<td>{$visitCount.weekAvg.pu|default=0}</td>
         			<td>{:round($visitCount['weekAvg']['pv']/$visitCount['weekAvg']['pu'],2)}</td>
         		</tr>
         	</table>
         </div>
        <php>$id = 3;</php>

    </div>
	<volist name='data' id='vo'>
		<php>
			$user = $vo['total_users']+$vo['total_guests'];
			$value[0][] = $vo['new_users'];
			$value[1][] = $vo['active_guests'];
			$ticks[] = $vo['day'];
		</php>
	</volist>
	{:W('Plot',array('tpl'=>'zx','type'=>'zx','value'=>$value,'title'=>"[蓝色线条]新增用户数，[黄色线条]活跃用户数" ,'ticks'=>$ticks ))}
</div>
<include file="__THEME__/admin_footer" />